@echo on

call  "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64

if errorlevel 1 (
   echo Failure Reason Given is %errorlevel%
   exit /b %errorlevel%
)

cd project

echo "Delete last build ... "
del /f /s /q bin

if errorlevel 1 (
   echo Failure Reason Given is %errorlevel%
   exit /b %errorlevel%
)

cd LoggerDLL
@echo on

msbuild LoggerDLL.vcxproj   -p:Configuration=cRelease;Platform=Win32 /t:Rebuild
msbuild LoggerDLL.vcxproj   -p:Configuration=cuRelease;Platform=Win32 /t:Rebuild
msbuild LoggerDLL.vcxproj   -p:Configuration=wRelease;Platform=Win32 /t:Rebuild
msbuild LoggerDLL.vcxproj   -p:Configuration=wuRelease;Platform=Win32 /t:Rebuild
msbuild LoggerDLL.vcxproj   -p:Configuration=cDebug;Platform=Win32 /t:Rebuild
msbuild LoggerDLL.vcxproj   -p:Configuration=cuDebug;Platform=Win32 /t:Rebuild
msbuild LoggerDLL.vcxproj   -p:Configuration=wDebug;Platform=Win32 /t:Rebuild
msbuild LoggerDLL.vcxproj   -p:Configuration=wuDebug;Platform=Win32 /t:Rebuild

msbuild LoggerDLL.sln   -p:Configuration=URelease;Platform=Win32 /t:Build
msbuild LoggerDLL.sln   -p:Configuration=Release;Platform=Win32 /t:Build
msbuild LoggerDLL.sln   -p:Configuration=cRelease;Platform=Win32 /t:Build
msbuild LoggerDLL.sln   -p:Configuration=cuRelease;Platform=Win32 /t:Build
msbuild LoggerDLL.sln   -p:Configuration=wRelease;Platform=Win32 /t:Build
msbuild LoggerDLL.sln   -p:Configuration=wuRelease;Platform=Win32 /t:Build
msbuild LoggerDLL.sln   -p:Configuration=UDebug;Platform=Win32 /t:Build
msbuild LoggerDLL.sln   -p:Configuration=Debug;Platform=Win32 /t:Build
msbuild LoggerDLL.sln   -p:Configuration=cDebug;Platform=Win32 /t:Build
msbuild LoggerDLL.sln   -p:Configuration=cuDebug;Platform=Win32 /t:Build
msbuild LoggerDLL.sln   -p:Configuration=wDebug;Platform=Win32 /t:Build
msbuild LoggerDLL.sln   -p:Configuration=wuDebug;Platform=Win32 /t:Build

copy ..\bin\LoggerDLL\*.exe ..\..\bin\win32  /Y
copy ..\bin\LoggerDLL\*.dll ..\..\bin\win32  /Y
copy ..\bin\LoggerDLL\*.lib ..\..\bin\win32  /Y


msbuild LoggerDLL.vcxproj   -p:Configuration=cRelease;Platform=x64 /t:Rebuild
msbuild LoggerDLL.vcxproj   -p:Configuration=cuRelease;Platform=x64 /t:Rebuild
msbuild LoggerDLL.vcxproj   -p:Configuration=wRelease;Platform=x64 /t:Rebuild
msbuild LoggerDLL.vcxproj   -p:Configuration=wuRelease;Platform=x64 /t:Rebuild

msbuild LoggerDLL.vcxproj   -p:Configuration=cDebug;Platform=x64 /t:Rebuild
msbuild LoggerDLL.vcxproj   -p:Configuration=cuDebug;Platform=x64 /t:Rebuild
msbuild LoggerDLL.vcxproj   -p:Configuration=wDebug;Platform=x64 /t:Rebuild
msbuild LoggerDLL.vcxproj   -p:Configuration=wuDebug;Platform=x64 /t:Rebuild


msbuild LoggerDLL.sln   -p:Configuration=URelease;Platform=x64 /t:Build
msbuild LoggerDLL.sln   -p:Configuration=Release;Platform=x64 /t:Build
msbuild LoggerDLL.sln   -p:Configuration=cRelease;Platform=x64 /t:Build
msbuild LoggerDLL.sln   -p:Configuration=cuRelease;Platform=x64 /t:Build
msbuild LoggerDLL.sln   -p:Configuration=wRelease;Platform=x64 /t:Build
msbuild LoggerDLL.sln   -p:Configuration=wuRelease;Platform=x64 /t:Build
msbuild LoggerDLL.sln   -p:Configuration=UDebug;Platform=x64 /t:Build
msbuild LoggerDLL.sln   -p:Configuration=Debug;Platform=x64 /t:Build
msbuild LoggerDLL.sln   -p:Configuration=cDebug;Platform=x64 /t:Build
msbuild LoggerDLL.sln   -p:Configuration=cuDebug;Platform=x64 /t:Build
msbuild LoggerDLL.sln   -p:Configuration=wDebug;Platform=x64 /t:Build
msbuild LoggerDLL.sln   -p:Configuration=wuDebug;Platform=x64 /t:Build


copy ..\bin\LoggerDLL\*.exe ..\..\bin\x64 /Y
copy ..\bin\LoggerDLL\*.dll ..\..\bin\x64  /Y
copy ..\bin\LoggerDLL\*.lib ..\..\bin\x64  /Y

